//
//  ScrollingLabel.m
//  MokoAPP
//
//  Created by 현식 강 on 11. 8. 13..
//  Copyright 2011 아이온. All rights reserved.
//

#import "ScrollingLabel.h"


@implementation ScrollingLabel
-(void)scrollingTime:(NSTimer*) timer {
    self.center = CGPointMake(self.center.x - 2.5, self.center.y);
    if( self.center.x < -(self.bounds.size.width / 2) ) {
        self.center = CGPointMake(self.superview.frame.size.width + (self.bounds.size.width / 2), self.center.y);
    }
}
-(void)startScrolling {
    if( timer == nil )
        timer = [NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(scrollingTime:) userInfo:nil repeats:YES];
}
-(void)dealloc {
    timer = nil;
    [super dealloc];
}
@end
